package net.dgg.dggcloud.service.iboss.constant;/**
 * Created by Administrator on 2017/12/13.
 */

import org.apache.commons.lang.StringUtils;

/**
 * @author 刘阳
 * @ClassName <BusCodeConstant>
 * @despriction 业务编码配置常量
 * @create 2017/12/13 8:55
 **/
public class BusCodeConstant {
    public final static String BUS_YT_ZJYW = "BUS_YT_ZJYW"; // 资金业务code
    public final static String BUS_YT_XYDK = "BUS_YT_XYDK"; // 信用贷款
    public final static String BUS_YT_DYDK = "BUS_YT_DYDK"; // 抵押贷款

    /**
     * 根据业态编码 获取大业态编码
     *
     * @param busCode
     * @return
     */
    public final static String getBigBusCode(String busCode) {
        if (StringUtils.isEmpty(busCode)) {
            return null;
        }
        String[] busArr = new String[]{BUS_YT_ZJYW, BUS_YT_XYDK, BUS_YT_DYDK};
        for (String bus : busArr) {
            if (busCode.contains(bus)) {
                return bus;
            }
        }
        return null;
    }

}
